<%-- 
    Document   : index
    Created on : 04/01/2013, 02:12:01 PM
    Author     : AdminTdp
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"    uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link title="default" media="screen" type="text/css" href="css/jquery-ui.css" rel="stylesheet">
        <link title="default" media="screen" type="text/css" href="css/jQueryTable.css" rel="stylesheet">
        <link title="default" media="screen" type="text/css" href="css/ui.jqgrid.css" rel="stylesheet">
        <link title="default" media="screen" type="text/css" href="css/token-input.css" rel="stylesheet">
        <link title="default" media="screen" type="text/css" href="css/general.css" rel="stylesheet">
        <title>JSP Page</title>
    </head>
    <body>
        <jsp:include page="include/head.jsp" />
        <div id="content-outer">
            <!-- start content -->
            <div id="content">
                <div id="page-heading">
                    <h1></h1>
                </div>
                <table width="100%" cellspacing="0" cellpadding="0" border="0" id="content-table">
                    <tbody><tr>
                            <th class="sized" rowspan="3"><img width="20" height="300" alt="" src="images/shared/side_shadowleft.jpg"></th>
                            <th class="topleft"></th>
                            <td id="tbl-border-top">&nbsp;</td>
                            <th class="topright"></th>
                            <th class="sized" rowspan="3"><img width="20" height="300" alt="" src="images/shared/side_shadowright.jpg"></th>
                        </tr>
                        <tr>
                            <td id="tbl-border-left"></td>
                            <td>
                                <!--  start content-table-inner -->
                                <div id="content-table-inner">
                                    <div class="clear" style="clear: both;"></div>
                                    <jsp:include page="include/menu-interno.jsp" />
                                    <div style="height: 55px;">
                                        <div class="successbox" > El documento se registro Correctamente </div>
                                    </div> 
                                    <form id="frmDocumento" >

                                        <input type="hidden" name="strpv_codigoDocumento" value="${objL_bean.strpv_codigoDocumento}"/>
                                        <input type="hidden" name="strpv_ArrayCargo" value="${objL_bean.strpv_arrayCargo}"/>
                                        <input type="hidden" name="strpv_flagVersion" value="${objL_bean.strpv_flagVersion}"/>
                                        <input type="hidden" name="strpv_tipoModificacion" value="${objL_bean.strpv_tipoModificacion}"/>
                                        <input type="hidden" name="strpv_urlPDFDocumento" value="${objL_bean.strpv_urlPDFDocumento}"/>

                                        <table id="id-form" cellspacing="0" cellpadding="0" border="0">
                                            <tbody>
                                                <tr>
                                                    <th valign="top">Codigo : </th>
                                                    <td>
                                                        <input class="inp-form" name="strpv_codigoReferencial" name type="text" value="${objL_bean.strpv_codigoReferencial}">
                                                    </td>
                                                    <td></td>
                                                </tr>                                                 
                                                <tr>
                                                    <th valign="top">Nombre : </th>
                                                    <td>
                                                        <input class="inp-form" name="strpv_nombreDocumento" name type="text" value="${objL_bean.strpv_nombreDocumento}">
                                                    </td>
                                                    <td></td>
                                                </tr>  
                                                <tr>
                                                    <th valign="top">Version : </th>
                                                    <td>
                                                        <input disabled="disabled" class="inp-form" name="strpv_codigoVersion" name type="text" value="${objL_bean.strpv_codigoVersion}">
                                                    </td>
                                                    <td></td>
                                                </tr>                                              
                                                <tr>
                                                    <th valign="top">Descripcion : </th>
                                                    <td>
                                                        <textarea class="form-textarea" name="strpv_descripcionDocumento" cols="" rows="">${objL_bean.strpv_descripcionDocumento}</textarea>
                                                    </td>
                                                    <td></td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">Periodo de Validacion </th>
                                                    <td>
                                                        <input class="inp-form" name="strpv_periodoValidacion"  style="width:50px" type="text" value="${objL_bean.strpv_periodoValidacion}"> Meses
                                                    </td>
                                                    <td></td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">Tipo de Documento </th>
                                                    <td>
                                                        <select  class="form-select" name="strpv_codigoTipoDocumento" >
                                                            <c:forEach  var="tipoDocumento" items="${lstL_tipoDocumento}">

                                                                <option value="${tipoDocumento.strpv_codigoTipoDocumento}"   ${tipoDocumento.strpv_codigoTipoDocumento == objL_bean.strpv_codigoTipoDocumento ? 'selected="selected"' : ''}  >${tipoDocumento.strpv_nombreTipoDocumento}</option>
                                                            </c:forEach>
                                                        </select>
                                                        <div id="divBloqueProcedimiento" style="display: none;"><a href="#" onclick="fnMostrarProcedimientos();">Enlazar a un procedimiento</a></div>
                                                    </td>
                                                    <td></td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">Empresa</th>
                                                    <td>
                                                        <select  class="form-select" name="strpv_codigoEmpresa"  >
                                                            <c:forEach  var="empresa" items="${lstL_empresa}">
                                                                <option value="${empresa.strpv_codigoEmpresa}"  ${empresa.strpv_codigoEmpresa == objL_bean.strpv_codigoEmpresa ? 'selected="selected"' : ''}  >${empresa.strpv_nombreEmpresa}</option>
                                                            </c:forEach>
                                                        </select>
                                                    </td>
                                                    <td></td>
                                                </tr>                                             
                                                <tr>
                                                    <th valign="top">Area / Cargos</th>
                                                    <td>
                                                        <input type="button" id="btnSeleccionarCargo" class="butt-form" value="Seleccionar Cargos" />
                                                    </td>
                                                    <td></td>
                                                </tr> 
                                                <tr>
                                                    <th valign="top">Tipo Ubicacion : </th>
                                                    <td>
                                                        <select  class="form-select" name="strpv_tipoUbicacion"  >
                                                            <c:forEach  var="tipoUbicacion" items="${hmL_tipoUbicacion}">
                                                                <option value="${tipoUbicacion.key}"   ${tipoUbicacion.key == objL_bean.strpv_tipoUbicacion ? 'selected="selected"' : ''}  >${tipoUbicacion.value}</option>
                                                            </c:forEach>
                                                        </select>
                                                    </td>
                                                    <td></td>
                                                </tr> 
                                                <tr class="divBloqueUbicacion" style="display: none;">
                                                    <th valign="top">Ubicacion : </th>
                                                    <td>
                                                        <input class="inp-form" name="strpv_ubicacion" name type="text" value="${objL_bean.strpv_ubicacion}">    
                                                    </td>
                                                    <td></td>
                                                </tr>
                                                <tr class="divBloqueUbicacion" style="display: none;">
                                                    <th valign="top">Número de copias : </th>
                                                    <td>   
                                                        <select  class="form-select" name="strpv_numeroCopia" >
                                                            <c:forEach  var="numDocumento" items="${hmL_numCopia}">

                                                                <option value="${numDocumento.key}"   ${numDocumento.key == objL_bean.strpv_numeroCopia ? 'selected="selected"' : ''}  >${numDocumento.value}</option>
                                                            </c:forEach>
                                                        </select>
                                                    </td>
                                                    <td></td>
                                                </tr>
                                                <tr class="divBloqueUbicacion" style="display: none;">
                                                    <th valign="top">Responsable : </th>
                                                    <td>
                                                        <div id="divResponsableDocumento">
                                                            <input type="text" id="input_token_usuarioReponsable" name="blah" />
                                                        </div>
                                                    </td>
                                                    <td></td>
                                                </tr>                                            
                                                <tr class="divBloqueUbicacion" style="display: none;">
                                                    <th valign="top">Responsable de copias : </th>
                                                    <td>
                                                        <div id="divResponsable">
                                                            <input type="text" id="input_token_usuarioReponsableCopia" name="blah" />
                                                        </div>
                                                    </td>
                                                    <td></td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">Usuario/Revisión :</th>
                                                    <td>
                                                       <input type="text" id="input_token_usuarioReponsableRevisar" name="blah" />
                                                    </td>
                                                    <td></td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">Usuario/Aprobar :</th>
                                                    <td>
                                                       <input type="text" id="input_token_usuarioReponsableAprobar" name="blah" />
                                                    </td>
                                                    <td></td>
                                                </tr>                                                 
                                                <tr>
                                                    <th valign="top">Documento :</th>
                                                    <td>
                                                        <input class="inp-form"  type="text" size="50" id="txt_link">
                                                        <input type="button"  class="butt-form" id="btnUpload" value="Upload">
                                                        <input type="button" class="butt-form" id="btnCargarArchivo" value="Cargar Archivo">
                                                    </td>
                                                    <td></td>
                                                </tr>                                             
                                                <tr>
                                                    <th valign="top"></th>
                                                    <td><div id="resultadoCarga">
                                                            <c:if test = "${objL_bean.strpv_urlPDFDocumento != ''}">
                                                                
                                                                <img src="img/icon/icon_pdf.png"> ${objL_bean.strpv_urlPDFDocumento}.pdf
                                                              
                                                                    
                                                            </c:if> 

                                                        </div></td>
                                                    <td></td>
                                                </tr> 
                                                <tr>
                                                    <th valign="top">Formatos :</th>
                                                    <td>
                                                        <input type="button" class="butt-form" id="btnAgregarFormato" value="Agregar Formatos">
                                                    </td>
                                                    <td></td>
                                                </tr>  
                                                <tr>
                                                    <th valign="top"></th>
                                                    <td><div id="resultadoCargaFormato">
                                                           
                                                           
                                                        
                                                        </div></td>
                                                    <td></td>
                                                </tr> 
                                            </tbody>
                                        </table>                                         
                                    </form>

                                    <!--  end content-table-inner  -->
                            </td>
                            <td id="tbl-border-right"></td>
                        </tr>
                        <tr>
                            <th class="sized bottomleft"></th>
                            <td id="tbl-border-bottom">&nbsp;</td>
                            <th class="sized bottomright"></th>
                        </tr>
                    </tbody>
                </table>

                <div class="clear">&nbsp;</div>

            </div>
            <!--  end content -->
            <div class="clear">&nbsp;</div>
        </div>        
    </body>
    <div id="dialog-cargos">
        <div id="content-cargos" ></div>
    </div>
    <div id="dialog-formato">
         <form>
               
                <table id="id-form-formato" cellspacing="2" cellpadding="0" border="0">
                    <input class="inp-form"  type="hidden" name="strpv_codigoFormato" value="">
                    <tbody>
                        <tr>
                            <th valign="middle">Codigo : </th>
                            <td>
                                <input class="inp-form" name="strpv_codigoRefFormato"  type="text" value="">
                            </td>
                            <td></td>
                        </tr> 
                        <tr>
                            <th valign="middle">Versión : </th>
                            <td>
                                <input class="inp-form" disabled="disabled" name="strpv_versionFormato"  type="text" value="">
                            </td>
                            <td></td>
                        </tr>                        
                        <tr>
                            <th valign="middle">Nombre : </th>
                            <td>
                                <input class="inp-form" name="strpv_nombreFormato"  type="text" value="">
                            </td>
                            <td></td>
                        </tr>
                        <tr>
                            <th valign="middle">Formato :</th>
                            <td>
                                <input class="inp-form"  type="text" size="50" id="txt_linkFormato">
                                <input type="button"  class="butt-form" id="btnUploadFormato" value="Upload">
                                <input type="button" class="butt-form" id="btnCargarFormato" value="Cargar Archivo">
                            </td>
                            <td></td>
                        </tr>                         
                </table>
         </form>
      
    </div>
    <div id="dialog-mensaje-error" title="Error">
        <table>
            <tr>
                <td><img src="img/icon/dialog-error.png"  border="0"/></td>
                <td><p id="mensaje-error"></p></td>
            </tr>
        </table>
    </div> 
    <script src="js/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="js/jquery-ui.min.js" type="text/javascript" ></script>
    <script src="js/jquery.dataTables.min.js" type="text/javascript" ></script>
    <script src="js/jquery.jqGrid.min.js" type="text/javascript" ></script>
    <script src="js/jquery.jqGrid.src.js" type="text/javascript" ></script>
    <script src="js/jquery.tokeninput.js" type="text/javascript" ></script>
    <script src="js/json2.js" type="text/javascript" ></script>
    <script src="js/ajaxUpload.js" type="text/javascript"></script>
    <script src="js/jcommon.js" type="text/javascript"></script>

    <script src="js/jdocumento.js" type="text/javascript"></script>
</html>